package com.rentplant.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.rentplant.Pojo.inform;
import com.rentplant.mapper.informMapper;
import com.rentplant.service.informService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class informServiceImp implements informService {
    @Autowired
    private informMapper informmapper;

    @Override
    //查找公告信息
    public List<inform> inform(){
        return informmapper.inform();
    }

    //    管理通信
//    查询公告信息并分页
    @Override
    public List<inform>allInform(JSONObject pageinfo){return informmapper.allInform(pageinfo);}

    //    查询公告信息并分页
    @Override
    public List<inform>allInforms(){return informmapper.allInforms();}

    //    修改公告信息
    @Override
    public boolean updateInform(JSONObject informInfo){return informmapper.updateInform(informInfo);}

    //    发布公告
    @Override
    public boolean addInform(JSONObject informInfo){return informmapper.addInform(informInfo);}

    //    条件查找
    @Override
    public List<inform> searchInform(JSONObject searchinfo){return informmapper.searchInform(searchinfo);}
    @Override
    public List<inform> searchInforms(JSONObject searchinfo){return informmapper.searchInforms(searchinfo);}


    //    删除公告
    @Override
    public boolean delById(JSONObject informinfo){return informmapper.delById(informinfo);}
}
